package com.bentley.kotlindemo.ui.kits.authorlist.adapter

import com.bentley.kotlindemo.R
import com.bentley.kotlindemo.db.entity.User
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * <pre>
 *  ┌────────────────────────────────────────────
 *  │ @author  Lee  @date 2021/3/17 09:52
 *  ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
 *  │ @desc
 *  └────────────────────────────────────────────
 * </pre>
 */
class AuthorListAdapter(
    layoutId:Int,
    data:List<User>? = null
): BaseQuickAdapter<User, BaseViewHolder>(layoutId, data as MutableList<User>?){
    override fun convert(helper: BaseViewHolder, item: User) {
        item?.let {

            helper.setText(R.id.tvName,item?.name)
        }

//        when(item.age){
//            1 -> helper.setText(R.id.tvName,item?.name)
//            2 ->  helper.setText(R.id.tvName,item?.name)
//        }

    }

}
